<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="../favicon.ico">
     <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade clearfix">
      <h1 class="clearfix"><a class="col-md-6 title_color H_right H_active" id="Ap1" style="display: inline-block;font-size: 20px" href="{:url('fypm')}">所属经销商发运排名</a> <a class="col-md-6 title_color"  id="Ap2" style="color:#333;font-size: 20px;display: inline-block;" href="{:url('fycx')}">所属经销商发运明细查询</a></h1>
    </div>
    <!-- 标题 -->
    <div>
    <form action="" class="form-inline">
      <table class="row-margin-top tab-content table-bordered table" border="1">
          <tr>
            <td>年份：<select name="cid" id="cid" class="form-control">
             <option value="">--请选择--</option>
              {volist name="cainian" id="c"}
               
                {if $c.id==$cid}
                  <option value="{$c.id}" selected>{$c.title}</option>
                {else/}
                  <option value="{$c.id}">{$c.title}</option>
                {/if}
              {/volist}
            </select><span class="lr_5"></span> <button type="button" class="btn-info btn btn-outline {if $type==1}active{/if}" onclick="cx(1)">前5名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $type==2}active{/if}" onclick="cx(2)">前20名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $type==3}active{/if}" onclick="cx(3)">前50名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $type==4}active{/if}" onclick="cx(4)">后50名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $type==5}active{/if}" onclick="cx(5)">查看所有</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline" onclick="dc()">导出Excel</button></td>
		    </tr>
        <tr>
          <td class="text-center font-bold">{$nian.title}年所展经销商发运排名</td>
          </tr>
          <tr>
			       <td class="text-right">
                单位(万元)
            </td>
          </tr>
      </table>
    
      <table class="table table-bordered text-right bud_hei" style="margin:0">
          <tr class="info">
            <th class="text-center">序号</th>
            <th class="text-center">经销商名</th>
            <th class="text-center">区域</th>
            <th class="text-center">省份</th>
            <th class="text-center">城市</th>
            {volist name="kaohe2" id="k"}
            <th class="text-center">{$k.title}</th>
            {/volist}
            <th class="text-center">小计</th>
          </tr>
          {volist  name="apply" id="vo" key="in"}
          <tr>
            <tr class="text-center">
              <td>{$in}</td>
              <td>{$vo.title}</td>
              <td>{$vo.fenqu}</td>
              <td>{$vo.sheng}</td>
              <td>{$vo.shi}</td>
              {volist name="$vo.jine" id="j"}
              <td class="ObjectNum jisuan{$i}">{$j}</td>
              {/volist}
              <td class="ObjectNum jisuanz">{$vo.zong}</td>
            </tr>
          </tr>
          {/volist}
          <tfoot>
            <tr class="trTotal">
              <td colspan="5">总计：</td>
              {volist name="$kaohe2" id="j"}
              <td class="ObjectNum zonghe{$i}">0</td>
              {/volist}
              <td class="ObjectNum zonghez">0</td>
            </tr>
          </tfoot>
      </table>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/common.js"></script>
    <script>
    function dc(){
      var cid=$("#cid").val();
      window.open("{:url('fypmdc')}?cid="+cid)
    }
    var ckaohe={$kaohe2c};
    for(var i=1;i<=ckaohe;i++){
      var tmphe=0;
      $(".jisuan"+i).each(function(){
        tmphe+=parseFloat($(this).html());
      })
      $(".zonghe"+i).html(tmphe)
    }
    var tmphe=0;
      $(".jisuanz").each(function(){
        tmphe+=parseFloat($(this).html());
      })
      $(".zonghez").html(tmphe)
    function cx(tid){
      var cid=$("#cid").val();
      location.href='{:url("fypm")}?cid='+cid+"&type="+tid;
    }
    $("#cid").change(function(){
       var cid=$("#cid").val();
      location.href='{:url("fypm")}?cid='+cid
    })
        $(document).ready(function(){
        	var $ObjectNum =$(".ObjectNum");
        	   toNum($ObjectNum);
        })
    </script>
</body>

</html>
